Restore of full system backup and incremental backups using multiple simultaneous device streams

ABSTRACT

A technique for restoring file systems by applying full and incremental backups together while streaming them from multiple devices provides a faster system restore from a full backup where incremental backups must also be applied. A first storage device streams the full backup while at least one second storage device streams at least one incremental backup. As files are detected in the incremental backup, they are written instead of the corresponding file in the full backup. Incremental backups can be pre-merged to reduce their number to one less than a number of storage devices available to stream the backups, so that the full backup can be streamed along with the pre-merged incremental backup(s) to restore the file system.

The present U.S. Patent Application is a Continuation of U.S. patentapplication Ser. No. 12/644,539, filed on Dec. 22, 2009 and claimspriority thereto under 35 U.S.C. §120.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention is related to storage file systems within computersystems, and more specifically to a system restore methodology thatrestores full and incremental backups using multiple simultaneous devicestreams.

2. Description of Related Art

In large-scale computer systems, after a catastrophic event such as atotal system failure or when a software upgrade must be backed-out dueto problematic changes to the operating system or other components ofthe software, a full file system restore may need to be performed. Whena full system backup is available, the process of performing a fullsystem restore is typically streamlined by writing large sequentialchunks of restore data to the storage containing the file system to berestored. If the backup is be partitioned, e.g., into multipleindependent volumes, the restore image can be written simultaneouslyfrom several backup streams, which are generally provided from slowerdevices such as magnetic tape storage devices. Since the backup devicesare typically the limiting bandwidth for the restore process, using alarger number of backup devices reduces the time required to restore thefile system.

However, in a typical system backup management scheme, a full backup isperformed at predetermined intervals, e.g., weekly intervals, andincremental backups are performed more frequently, e.g., at the end ofevery business day or on an even shorter interval. If the backup beingrestored requires several incremental updates, then the restore processcan be slowed significantly by having to apply the full system backupand then each incremental backup. Further, a full system backup withincremental backups are not typically restored from multiple devicestreams, since the incremental backups take precedence over the fullbackup and any earlier incremental backups.

Therefore, it would be desirable to provide for restoring full andincremental system backups together using multiple device streams.

BRIEF SUMMARY OF THE INVENTION

The invention is embodied in a computer-performed method, that providesfor restore from full and incremental backups from multiple devicestreams when restoring a file system to a target storage within acomputer system.

The method copies files to restore a file system from multiple restoredevices and streams incremental backups along with the full systembackups by reading the full backup from a first storage device and whilethe full backup is being read, also reading at least one incrementalbackup from a corresponding at least one other storage device. Filesread from the full backup are selectively not written from the fullbackup, but are written to the target storage from the incrementalbackup as the files are found in the incremental backup.

If insufficient storage devices are available to restore all of theincremental backups along with the full backup, then incremental backupscan be pre-merged to a temporary storage to reduce the number ofincremental backups that are required. The pre-merging process can berepeated until the number of merged incremental backups is one less thanthe number of available storage devices for reading the backups, so thatthe pre-merged backups and the full backup can be streamed to restorethe file system. The pre-merging can be performed as part of the backupor part of the restore processing.

The foregoing and other objectives, features, and advantages of theinvention will be apparent from the following, more particular,description of the preferred embodiment of the invention, as illustratedin the accompanying drawings.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING

The novel features believed characteristic of the invention are setforth in the appended claims. The invention itself, however, as well asa preferred mode of use, further objectives, and advantages thereof,will best be understood by reference to the following detaileddescription of the invention when read in conjunction with theaccompanying Figures, wherein like reference numerals indicate likecomponents, and:

FIG. 1 is a block diagram illustrating a networked computer system inwhich techniques according to an embodiment of the present invention arepracticed.

FIG. 2 is a flow chart of a file system restore method in accordancewith an embodiment of the present invention.

FIG. 3 is a flow chart of a merge operation used in the file systemrestore algorithm depicted in FIG. 2.

DETAILED DESCRIPTION OF THE INVENTION

The present invention relates to computer backup and restore systems,and in particular to file system restore operations performed frommultiple streaming devices in which a full backup and one or moreincremental backups are applied in a single operation. The backup imagesare ordered and the incremental and full backup images are merged on thefly, so that the images can be streamed from multiple restore deviceswithout requiring successive application of the incremental backupsafter the full backup has been restored, as is typically performed infile system restore operations. If the number of incremental backupscombined with the full backup exceeds the number of streaming devicesavailable, then multiple incremental backups are pre-merged to a singlebackup image on a temporary storage and then the merged image is furthermerged with the full backup and any remaining incremental backups.

Referring now to FIG. 1, a networked computer system in which anembodiment of the present invention is practiced is depicted in a blockdiagram. A workstation computer system 10 includes a processor CPUcoupled to a memory MEM that contains program instructions for executionby CPU, including a virtual file system (VFS) interface 11A, whichprovides a native file system interface to the particular operatingsystem executed by workstation computer system 10, for example theWINDOWS operating system. Workstation computer 10 is also depicted asincluding a graphical display Display and input devices Input Devices,such as mice and keyboards, for interacting with user interfacesincluding login screens and other user interfaces for interacting withother computers connected to the network, for example, administrationscreens for administering selection of the full and incremental backupsto apply, and to control or edit scheduling of the backup processes andinitiate the restore processes of the present invention. Workstationcomputer system also includes a hard disc controller HDC 14 thatinterfaces processor CPU to local storage device 17A and a networkinterface that couples workstation computer system 10A to network 15,which may be fully wireless, fully wired or any type of hybrid network.VFS interface 11A provides a uniform set of application programminginterfaces (APIs) that provide access to resources, such as localstorage 17A or remote storage such as storage devices 17B and 17C, whichare coupled to network 15 by network disc controller (NWDC) 18.

A server rack computer system 12, having at least one server memory SMEMand a server processor SCPU is also shown coupled to network 15. Adifferent VFS client 11B is provided and executed within workstationcomputer system 10B to provide suitable native APIs for accessingstorage within server rack 12, networked storage devices 17B and 17C, aswell as storage device 17A within workstation computer system 10, ifstorage device 17A is shared. A system configuration as is generallyused with the present invention will include a large number ofworkstation computer systems such as workstation 10 and a large numberof server racks such a server rack 12. Storage within such a computersystem will also generally include large arrays of storage devices.However, the techniques of the present invention are not dependent onscale and therefore can be practiced within smaller systemconfigurations, as well. A number of backup and restore devices 19A-19D,e.g., magnetic tape drives, are coupled to network 15 for generating andreading multiple backup/restore images on media MEDIA, such as backuptapes, as will be described in further detail below. The backupoperations of the present invention can be controlled by either or bothof VFS client 11A and 11B or another process executing within serverrack 12 workstation computer system 10 or another system coupled tonetwork 15 including processes executing within controllers withinnetworked storage devices 17B and 17C. In general, the present inventionreads images from backup storage such as media MEDIA that is installedin one or more restore devices such as devices 19A-19D, and thenrestores a file system from the backup images onto a target storage suchas networked storage devices 17B and 17C.

Network 15 may include wireless local area networks (WLANs), wiredlocal-area networks (LANs), wide-area networks (WANs) or any othersuitable interconnection that provides communication between workstationcomputer system 10 and server rack 12, storage devices 17A-17C, and anyother systems and devices coupled to network 15. Further, the presentinvention concerns backup and restore functionality that is not limitedto a specific computer system or network configuration. Finally, thespecification of workstation computer system 10 and server rack 12 andthe location of their specific memory MEM and file system interfaceobjects 11A and 11B does not imply a specific client-server relationshipor hierarchical organization, as the techniques of the present inventionmay be employed in distributed systems in which no particular machine isidentified as a server, but at least one of the machines provides aninstance and functionality of a program or object that performs backupand restore operations in accordance with an embodiment of the presentinvention. The objects or interfaces process accesses according tomethods and structures of the present invention, as described in furtherdetail below.

Referring now to FIG. 2, a file system restore method in accordance withan embodiment of the present invention is illustrated in a flowchart. Inthe depicted method, first the number of incremental backups N to beapplied is determined (step 30) and the number M of available restoredevices is also determined (step 31). If N+1>M, i.e. the number ofincremental backups N incremented to include the full backup is greaterthan the number M of available restore devices (decision 33), thenmultiple incremental backups are pre-merged to a temporary storagelocation to reduce the number of incremental backups (step 34). Step 34and decision 33 are repeated until the remaining incremental backups andthe full backup can be simultaneously read by the available restoreddevices. Then, the full and incremental backups are restored by mergingthe full and incremental backup streams.

The temporary image generated by the pre-merging operations contains atmost one copy of each file. The total amount of data in the temporaryimage cannot exceed the total amount of data to be restored. Therefore,there will be sufficient space in the storage allocated for the filesystem to hold the result of each pre-merge step. The pre-mergeoperations can be performed on any subset of the incremental backups,and there is an advantage in pre-merging the smallest incrementalbackups, so that the temporary image is as small as possible. Whenperforming multiple pre-merge steps, the disk space occupied by thetemporary image from the previous pre-merge step can be freed as data isbeing copied to the final location of the file system, so that the totalof the temporary image and the restored portions of the file system arestill guaranteed to fit in the allocated space. Similarly, during thefinal merge and restore from the full backup, the temporary image andany additional incremental backups, the disk space in the temporary filefrom the last pre-merge operation can be freed as its data is being readduring the copy operations. Some operating systems such as AIX support asystem call (e.g., fclear) that frees disk space within an existing fileas it is no longer needed. In systems that do not support suchoperations, during restore operations where remaining storage spacebecomes a critical factor, the temporary image generated by thepre-merge is broken up into a sequence of smaller temporary files, sothat the smaller files can be deleted as their data is no longer needed.

In one embodiment of the invention, the pre-merge operation(s) alwaysmerges the newest incremental backups first. Since the files in thetemporary image will therefore be more recent than the files in all ofthe other incremental backups and the full backup, the temporary imagemay be stored directly in the target storage for the file system as thefinal data. An abbreviated summary of the temporary image, e.g., a listof files in the temporary image, may be generated to list the restoredfiles without their data or attributes. Subsequent pre-merge operations,as well as the final merge with the full backup can then refer to theabbreviated summary to determine if more recent data has already beenrestored. The abbreviated summary may be updated at each pre-mergeoperation if multiple pre-merge operations are performed using the mostrecent incremental backups at each pass.

Referring now to FIG. 3, a merge operation as used in the algorithm ofFIG. 2 is shown. Once file information is streamed from the full backupimage (step 40), if file info from the same file has been streamed fromone or more incremental backup images (decision 42), then the file willbe restored from the newest incremental backup containing the file (step46) and the remainder of the file in the full backup can be skipped(step 48). Otherwise if the file was only present in the full backupimage, then the file is restored from the full backup image (step 44).

The backup images are similar to backup images generally used bybackup/restore processes, but the files are generally arrangedsequentially on the backup media in a canonical order so that theincremental backup(s) can be streamed along with the full backups, tominimize the required restore time. In order to accomplish the ordering,the files are generally ordered by inode or alphabetically according totheir full directory path. When reading the media, the media is read farenough ahead to determine the file information, e.g., file name or inodenumber, so that a comparison can be made to determine the newestincremental backup containing the file, without interrupting streaming.When using a summary of a merged stream as described above, the summaryneed only contain the file identifiers.

While the invention has been particularly shown and described withreference to the preferred embodiments thereof, it will be understood bythose skilled in the art that the foregoing and other changes in form,and details may be made therein without departing from the spirit andscope of the invention.

1. A computer-performed method for restoring a file system to a targetstorage, the method comprising: first reading a first backup streamcontaining a full backup of the file system from a first one of themultiple storage devices; while performing the first reading, secondreading at least one second backup stream containing a corresponding atleast one incremental backup of the file system from a corresponding atleast one second one of the multiple storage devices; determiningwhether the at least one second backup stream contains a copy of a fileread by the first reading; responsive to determining that the at leastone second backup stream does not contain the copy of the file read bythe first reading, first writing the file read by the first reading tothe target storage; and responsive to determining that the at least onesecond backup stream contains the copy of the file read by the firstreading, second writing the file read by the second reading to thetarget storage.
 2. The computer-performed method of claim 1, wherein thefull backup and the at least one incremental backup store files of thefile system in a common canonical order and wherein the method furthercomprises: continuing the first reading the first backup stream;subsequent to writing the file written read by the second reading to thetarget storage, continuing the second reading the second backup streamto determine an identifier of a next file in the corresponding at leastone incremental backup; comparing identifiers of files read by the firstreading with the identifier of the next file I the corresponding atleast one incremental backup; and halting the second reading the secondbackup stream until a result of the comparing indicates the next filehas been reached in the first backup stream.
 3. The computer-performedmethod of claim 2, wherein the common canonical order of the files inthe full backup and the at least one incremental backup is an orderaccording to inodes of the files.
 4. The computer-performed method ofclaim 2, wherein the common canonical order of the files in the fullbackup and the at least one incremental backup is an alphabeticalordering of the files.
 5. The computer-performed method of claim 1,further comprising prior to performing the first reading, the secondreading, the first writing and the second writing: third reading a firstone of the at least one incremental backup; fourth reading a second oneof the at least one incremental backup; determining whether the secondone of the at least one incremental backup contains a copy of anotherfile read by the third reading; responsive to determining that thesecond one of the at least one incremental backup stream does notcontain the copy of the another file read by the third reading, thirdwriting the another file read by the third reading to a temporarystorage to generate a merged incremental backup; and responsive todetermining that the second one of the at least one incremental backupdoes not contain the copy of the another file read by the third reading,fourth writing the file read by the fourth reading to the temporarystorage to generate the merged incremental backup, and wherein thesecond reading reads the temporary storage to read the mergedincremental backup subsequent to the writing of the another file to thetemporary storage.
 6. The computer-performed method of claim 5, whereinthe third reading, the fourth reading, the third writing and the fourthwriting are performed responsive to determining that a number of themultiple storage devices is insufficient to stream the full backup andall of the incremental backups needed to perform the restoring of thefile system.
 7. The computer-performed method of claim 6, wherein themethod further comprises: dividing one more than the number of all ofthe needed incremental backups by the number of the multiple storagedevices to generate a number of pre-merging iterations required;repeating the third reading, the fourth reading, the third writing andthe fourth writing to generate merged incremental backups for each ofthe pre-merging iterations; and performing the first reading, the secondreading, the first writing and the second writing subsequent tocompleting the pre-merging iterations.